#Compilation du noyaux
SET(CORE_SOURCE
BdAuteur.cpp
BdEditeur.cpp
BdLivre.cpp
BdBibliotheque.cpp
BdRegistry.cpp
BdTraceTerminal.cpp
)

#All headers
SET(CORE_HEADERS
BdAuteur.h
BdEditeur.h
BdLivre.h
BdBibliotheque.h
BdRegistry.h
BdTraceTerminal.h
)


#Headers with QObject (abstract class or core class)
SET(CORE__MOC_HEADERS
BdRegistry.h
)


QT4_WRAP_CPP(CORE_MOC_SOURCE ${CORE__MOC_HEADERS})


INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR} 
${QT_INCLUDE_DIR}
${QT_INCLUDE_DIR}/QtCore
${QT_INCLUDE_DIR}/QtGui
)

ADD_LIBRARY(biblio_core SHARED ${CORE_SOURCE} ${CORE_MOC_SOURCE})

TARGET_LINK_LIBRARIES(biblio_core
${QT_QTCORE_LIBRARY}
)

INSTALL(TARGETS biblio_core
  RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
  LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
  ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)

